import Vue from "vue"
import Vuex from "vuex"
import http from "@/utils/request.js"
Vue.use(Vuex)

const store = new Vuex.Store({
	state: {
		basicData: {
			index_bg: {},
			index_pop: {},
			login_banner: {},
			index_banner: {},
			privacy: {},
			agreement: {},
		}
	},
	mutations: {
		async getBasicData(state) {
			const res = await http("get", "/api/index/basic")
			state.basicData = res.data;
		}
	}
})

export default store;